<template>
  <div id="CapitalInfo">
    <section class="c-header">
      <van-image fit="cover" class="c-header__img" :src="infoData.picture"/>
      <ul class="c-header__wrap">
        <li class="c-header__title">{{ infoData.title }}</li>
        <li>{{ infoData.mininvest }}/{{ infoData.maxinvest }}万</li>
        <li>{{ addrFmt(infoData) }}{{infoData.capaddress}}</li>
      </ul>
    </section>
    <section class="l-bottom">
      <header class="l-bottom__header">详情介绍</header>
      <p class="l-bottom__content" v-html="infoData.details"/>
    </section>
  </div>
</template>
<script lang="ts">
import Vue, {ComponentOptions, VueConstructor} from "vue"
import Component from 'vue-class-component'
import {Prop} from "vue-property-decorator";
import {requestByGet, requestByPost} from "@/utils/request";

export const title = ""
@Component
export default class CapitalInfo extends Vue implements ComponentOptions<Vue> {
  name = "CapitalInfo"
  @Prop() customId!: any;
  infoData = {};
  async created() {
    this.infoData = await requestByGet(`/qqc/qqcCapital/queryById`, {id: this.customId});
  }
}
</script>

<style scoped lang="scss">
@import "~assets/common.scss";

#CapitalInfo {
  .c-header {
    background: white;
    @include alignCenter;
    padding: 16px;

    &__img {
      @include rect(70px);
      flex-shrink: 0;
      margin-right: 20px;
    }

    &__wrap {
      flex: 1;
      line-height: 1.4;
      color: $p-color;
    }

    &__title {
      font-size: 18px;
      color: $strong-clr;
    }
  }

  .l-bottom {
    margin-top: 20px;
    background: white;

    &__header {
      padding: 0 15px;
      font-size: 14px;
      height: 40px;
      line-height: 40px;
      border-bottom: 1Px solid $border-clr;
    }

    &__content {
      padding: 13px;
      line-height: 1.5;
      color: $p-color;
      font-size: 14px;
    }
  }
}
</style>
